﻿<html>
<head></head>
<body>

<img src="img1.jpg" style="width:300px;height:300px">
<br>

<p>Hello!</p>
<button type="button" id="btn1" onclick="callAndroid()" style="width:100px;height:30px">btn1</button><br>
<button type="button" id="btn2" onclick="callAdd(2,4)" style="width:100px;height:30px">btn2</button><br>
<button type="button" id="btn3" onclick="callJSWithUrl()" style="width:100px;height:30px">btn3</button><br>

</body>
<script>
function callJS(){
alert("Android调用了JS的callJS()方法");
}

function callAndroid(){
test.hello("js调用了Android中的hello()方法");
}

function callAdd(x,y){
test.add(x,y);
}

function callJSWithUrl(){
document.location = "js://webview?arg1=1111&arg2=2222";
}



</script>
</html>